"""
添加线索页面类
"""
from ..base_page import BasePage
from selenium.webdriver.common.by import By
from selenium.webdriver.support.select import Select

class AddCluePage(BasePage):
    #数据
    url="/crm/index.php?m=leads&a=add"
    #定位器
    select_locator = (By.CSS_SELECTOR, "#source")
    tips_clue_locator = (By.CSS_SELECTOR, "body > div.container > div.page-header > h4")
    #方法
    def select_source(self,select_source):
        source=self.find_element(self.select_locator)
        source_obj=Select(source)
        source_obj.select_by_visible_text(select_source)
    def tips_clue(self):
        return self.find_element(self.tips_clue_locator).text

